Repository navigation
Conversation
…when OTEL_EXPORTER_OTLP_ENDPOINT is set (deeplethe#1539) Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ane and status (deeplethe#1539) Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
gedaiu
force-pushed
the
feat/opentelemetry
branch
from
November 27, 2026 14:48
ae6d8d6 to
391b322
Compare
This was referenced Nov 28, 2026
gedaiu
added a commit
to re-cinq/utopia
that referenced
this pull request
Nov 28, 2026
Carry the OpenTelemetry metrics onto re-dev (upstream deeplethe#1540 to deeplethe#1548)
Contributor
…s otherwise (deeplethe#1539) utopia=debug stays a stdout setting: the global EnvFilter now applies to the fmt layer only, so debug spans are no longer exported. One exporter test per metric is kept.
gedaiu
marked this pull request as ready for review
November 29, 2026 16:18
This was referenced Nov 29, 2026
…TER=none keeps metrics only (deeplethe#1539) http/protobuf is the default, as the OTel spec asks, and grpc stays one variable away. Prometheus's own OTLP receiver takes HTTP and no traces, so both are needed to push metrics straight to it.
gedaiu
added a commit
to re-cinq/utopia
that referenced
this pull request
Nov 30, 2026
The server can push its metrics to Prometheus over OTLP/HTTP (upstream deeplethe#1540)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! This is the first of the three PRs for #1539: the setup and both queue gauges. #1541 is folded in, as suggested on #1539.
When
OTEL_EXPORTER_OTLP_ENDPOINTis set, the server sends its traces and metrics over OTLP. When it is not set, nothing changes and the logs look exactly as before.utopia.jobs.queue.sizeis the number of due queued and running jobs per base, lane and status. One grouped query refreshes it every 30 seconds. A retry that is not due yet is left out, the same way the worker skips it. A job is placed in its base through its kb_id, document or source, and a malformed kb_id lands under "none" instead of failing the count.utopia.jobs.queue.oldest_waitis how long, in seconds, the oldest due queued job of each base, lane and status has waited. It reads from the same snapshot, so it adds no query.OTEL_EXPORTER_OTLP_PROTOCOL:http/protobufby default, as the OTel spec asks, orgrpc.OTEL_TRACES_EXPORTER=nonekeeps metrics only. Together they let the server push straight into Prometheus's own OTLP receiver (--web.enable-otlp-receiver), which takes HTTP and no traces. I checked that against Prometheus 3.5 locally, and both queue gauges arrived.infoby default and overridable withUTOPIA_OTEL_FILTER. The globalEnvFilternow applies to stdout only, soutopia=debugspans stay in the log and are not exported.Tests: one in-memory exporter test per gauge, one for the refresh against the database, one checking that a debug span stays out of the export, and three for reading the endpoint.
I checked it against a local collector and both gauges showed up as expected. Model calls and job outcomes come next, as their own PRs against
dev. Thanks for taking a look!